CREATE TABLE [dbo].[TTLETP_ANUL]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_PROV] [dbo].[TD_VC_020] NOT NULL,
[NU_LETR_PROV] [dbo].[TD_VC_020] NOT NULL,
[CO_TIPO_OPER] [dbo].[TD_VC_003] NULL,
[FE_ANUL] [dbo].[TD_DT_001] NULL,
[ST_CONT] [dbo].[TD_VC_001_INTE] NULL CONSTRAINT [DF__TTLETP_AN__ST_CO__28E2F130] DEFAULT ('N'),
[NU_PROC] [dbo].[TD_IN_001] NULL CONSTRAINT [DF__TTLETP_AN__NU_PR__2ACB39A2] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTLETP_AN__CO_US__2BBF5DDB] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTLETP_AN__FE_US__2CB38214] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTLETP_AN__CO_US__2DA7A64D] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTLETP_AN__FE_US__2E9BCA86] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTLETP_ANUL] WITH NOCHECK ADD CONSTRAINT [CK__TTLETP_AN__ST_CO__29D71569] CHECK NOT FOR REPLICATION (([ST_CONT]='P' OR [ST_CONT]='N'))
GO
ALTER TABLE [dbo].[TTLETP_ANUL] ADD CONSTRAINT [PK__TTLETP_A__EB5120FA56E9B302] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_PROV], [NU_LETR_PROV]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTLETP_ANUL] ADD CONSTRAINT [FK__TTLETP_ANUL__60C822F7] FOREIGN KEY ([CO_EMPR], [CO_PROV], [NU_LETR_PROV]) REFERENCES [dbo].[TMLETR_PROV] ([CO_EMPR], [CO_PROV], [NU_LETR_PROV])
GO
